<?php

include '../Functions/QueryController.php';

if (!isset($_POST['basic_patient_info']) && !isset($_POST['physical_symptom_info']) && !isset($_POST['neuropsychological_symptom_info']) && !isset($_POST['psychological_test_info']) && !isset($_POST['diagnostic_test_info']) && !isset($_POST['icd_info']) && !isset($_POST['prescription_info'])) {
	
	print_r(json_encode(array(
						'result' => 'error',
						'message' => 'no post parameters' 
					)
	));
} else {
	
	$QueryController = new QueryController();
	print_r(json_encode(
			$QueryController->query($_POST['basic_patient_info'], $_POST['physical_symptom_info'], $_POST['neuropsychological_symptom_info'], $_POST['psychological_test_info'], $_POST['diagnostic_test_info'], $_POST['icd_info'], $_POST['prescription_info'])
		)
	);
}